package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.notice.example.NoticeRuleSettingExample.*;
import static org.jsola.notice.example.NoticeRuleSettingExample.E_USER_IDS;

/**
 * 消息提醒规则设置
 *
 * @author wcl
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "【消息提醒规则设置】的参数")
@Data
public class NoticeRuleSettingDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = false)
    private Long id;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_MODULE_TYPE, example = E_MODULE_TYPE)
    @Length(max = 100, message = M_MODULE_TYPE_MAX)
    private String moduleType;

    @ApiModelProperty(notes = N_NOTICE_TYPE_ID, example = E_NOTICE_TYPE_ID, required = true)
    @NotNull(message = M_NOTICE_TYPE_ID_NOT_NULL)
    private Long noticeTypeId;

    @ApiModelProperty(notes = N_NOTICE_TYPE_CODE, example = E_NOTICE_TYPE_CODE, required = true)
    @NotNull(message = M_NOTICE_TYPE_CODE_NOT_NULL)
    @Length(max = 50, message = M_NOTICE_TYPE_CODE_MAX)
    private String noticeTypeCode;

    @ApiModelProperty(notes = N_ENABLE_STATUS, example = E_ENABLE_STATUS, required = true)
    @NotNull(message = M_ENABLE_STATUS_NOT_NULL)
    private Boolean enableStatus;

    @ApiModelProperty(notes = N_EMP_TYPE, example = E_EMP_TYPE)
    private String empType;

    @ApiModelProperty(notes = N_ROLE_IDS, example = E_ROLE_IDS)
    @Length(message = M_ROLE_IDS_MAX)
    private String roleIds;

    @ApiModelProperty(notes = N_USER_IDS, example = E_USER_IDS)
    @Length(message = M_USER_IDS_MAX)
    private String userIds;

    @ApiModelProperty(notes = "渠道id")
    private String channelIds;

    @ApiModelProperty(notes = N_USER_ID_PARAM, example = E_USER_ID_PARAM)
    @Length(message = M_USER_ID_PARAM_MAX)
    private String userIdParam;

    @ApiModelProperty(notes = N_RECEIVE_TYPE, example = E_RECEIVE_TYPE, required = true)
    @NotNull(message = M_RECEIVE_TYPE_NOT_NULL)
    @Length(max = 32, message = M_RECEIVE_TYPE_MAX)
    private String receiveType;

    @ApiModelProperty(notes = N_RECEIVE_DATE_TYPE, example = E_RECEIVE_DATE_TYPE, required = true)
    @NotNull(message = M_RECEIVE_DATE_TYPE_NOT_NULL)
    private Integer receiveDateType;

    @ApiModelProperty(notes = N_RECEIVE_DATE_JSON, example = E_RECEIVE_DATE_JSON)
    @Length(message = M_RECEIVE_DATE_JSON_MAX)
    private String receiveDateJson;


}

